<?php
require_once(OC::$SERVERROOT . "/apps/jobposition/lib/helper.php");

if(!OC_User::isLoggedIn()) {
   echo '您需要先登录';
   exit();
}

OCP\JSON::callCheck();

$companyid = PFactory::getMasterUser()->id;

$fid = JRequest::getInt('fid', 0);
$jobdata = PJobpositionHelper::getJobGroupData($fid, $companyid);

if(!empty($jobdata)) {
   OCP\JSON::success(array('data' => $jobdata));
} else {
   OC_JSON::error(array('data' => array( 'message' => '职位组合不存在')));
}